//
//  IJKPlayVideoView.h
//  ijkPlayer
//
//  Created by apple on 2018/5/17.
//  Copyright © 2018年 锦. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <IJKMediaFramework/IJKMediaFramework.h>

/**
 ijkView的大小状态
 */
typedef NS_ENUM(NSInteger,IJKPlayVideoState)  {
    ijkVideo_small = 0,
    ijkVideo_fullScreen ,
    ijkVideo_animating
};

@interface IJKPlayVideoView : UIView

@property (nonatomic, assign) BOOL isFill;
@property (nonatomic, copy) NSString *urlStr;
@property (nonatomic, strong) UIView *playView;
//@property (weak, nonatomic) IBOutlet UIView *playView;
@property (nonatomic, retain) IJKFFMoviePlayerController *player;
/**
 ijkView的大小状态
 */
@property (assign, nonatomic) IJKPlayVideoState ijkPlayVideoState;



- (void)prepareToPlay;
- (void)play;
- (void)pause;
- (void)stop;
- (BOOL)isPlaying;
- (void)shutdown;
- (void)setPauseInBackground:(BOOL)pause;
- (NSTimeInterval )currentTime;
/**
 速率
 */
- (void)setCurrentPlaybackRate:(CGFloat )rate;
- (NSTimeInterval)duration;
- (void)seekTo:(CGFloat )time;
- (UIImage *)thumbnailImageAtCurrentTime;

- (void)installMovieNotificationObservers;
- (void)removeMovieNotificationObservers;
- (void)clearCache;

//预加载，需要在滑动的cell上判断是否有上个视频源或下个视频源，在这里做预加载
- (void)setPrestrainUrlWithString:(NSString *)urlStr;
- (void)setPrestrainLastUrlWithString:(NSString *)urlStr;
@end
